#!/usr/bin/env python3

import sys

import rospy

from plumbing_server_client.srv import Multiply, MultiplyResponse

if __name__ == '__main__':
    if len(sys.argv) != 3:
        rospy.logerr('Params Error!')
        sys.exit(1)
    rospy.init_node('MulCli')
    client = rospy.ServiceProxy('MultiPly', Multiply)
    num1 = int(sys.argv[1])
    num2 = int(sys.argv[2])
    client.wait_for_service()
    res: MultiplyResponse = client.call(num1, num2)
    rospy.loginfo('got res: %d', res.sum)
